<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>

  <button id="btn">click me</button>

  <script>
    // 事件(event)
    // 三要素：
    // 1. 事件源
    // 2. 事件处理函数
    // 3. 事件对象
    let btn = document.getElementById('btn');
    btn.addEventListener('click', function(e) {
      console.log(e);
    }, false);

    btn.addEventListener('mouseover', function(e) {
      console.log(e);
    }, false);

    btn.addEventListener('keydown', function(e) {
      console.log(e);
    }, false);

  </script>
</body>
</html>